<script setup lang="ts">
import Avatar from '../components/avatar/index.vue'
import { useRouter } from 'vue-router'
const router = useRouter()

const jump = (path:string) => {
    router.push({
        path: '/my/order'
    })
}
</script>

<template>

    <header>
        <a href="#" class="logo">Logo</a>
        <ul>
            <!-- <li><a href="#">首页</a></li>
            <li><a href="#">关于</a></li>
            <li><a href="#">服务</a></li>
            <li><a href="#">作品</a></li> -->
            <li @click="jump('/my/order')"><el-tag type="warning">我的订单</el-tag></li>
            <li><Avatar></Avatar></li>
        </ul>
    </header>

</template>

<style scoped lang="less">

@leftAndRight:100px;

header {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 2* @leftAndRight);
    left: @leftAndRight;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.6s;
    padding: 20px 40px;
    z-index: 12;
    background-color: rgba(255, 255, 255, .8);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

header .logo {
    position: relative;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0;
}

header ul {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

header ul li {
    position: relative;
    list-style: none;
    padding: 0 20px;
}

header ul li a {
    position: relative;
    margin: 0 15px;
    text-decoration: none;
    color: #fff;
    letter-spacing: 2px;
    font-weight: 500px;
    transition: 0.5s;
}
header.sticky .logo,
header.sticky ul li a {
    color: #000;
}
</style>